using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Decisions.HL7.Message;
using DecisionsFramework;

namespace Decisions.HL7.Message
{
    public class VaccinesadministeredcodeCVXparenteralunlessoralisnotedAttribute:RuleAttribute
    {
        private Dictionary<HL7Version, string[]> validVersionCodes = new Dictionary<HL7Version, string[]>();
        private Dictionary<HL7Version, string[]> validVersionDescriptions = new Dictionary<HL7Version, string[]>();
        private Dictionary<HL7Version, HL7TableType> tableVersionTypes = new Dictionary<HL7Version, HL7TableType>();

        public VaccinesadministeredcodeCVXparenteralunlessoralisnotedAttribute()
        {
            // init the values for table version types
						tableVersionTypes[HL7Version.v23] = HL7TableType.HL7;
						tableVersionTypes[HL7Version.v231] = HL7TableType.HL7;
						tableVersionTypes[HL7Version.v24] = HL7TableType.HL7;
						tableVersionTypes[HL7Version.v25] = HL7TableType.HL7;
						tableVersionTypes[HL7Version.v251] = HL7TableType.HL7;
			
            
			// init the values for version codes
						validVersionCodes[HL7Version.v23] = new string[]{""};
						validVersionCodes[HL7Version.v231] = new string[]{"54","55","82","24","19","27","26","29","56","12","28","20","50","01","22","57","52","83","84","31","85","30","08","42","43","44","45","58","59","60","46","47","48","49","17","51","61","62","86","87","14","15","16","88","10","02","89","39","63","64","65","66","03","04","67","05","68","32","07","69","11","23","33","70","18","40","90","72","73","34","74","71","06","38","75","76","09","35","77","13","78","25","41","53","91","79","21","81","80","92","36","37"};
						validVersionCodes[HL7Version.v24] = new string[]{"54","55","82","24","19","27","26","29","56","12","28","20","50","01","22","57","52","83","84","31","85","30","08","42","43","44","45","58","59","60","46","47","48","49","17","51","61","62","86","87","14","15","16","88","10","02","89","39","63","64","65","66","03","04","94","67","05","68","32","07","69","11","23","33","100","70","18","40","90","72","73","34","74","71","93","06","38","75","76","09","35","77","13","95","96","97","98","78","25","41","53","101","91","79","21","81","80","92","36","37","999","99"};
						validVersionCodes[HL7Version.v25] = new string[]{"54","55","82","24","19","27","26","29","56","12","28","20","106","107","50","01","22","102","57","52","83","84","31","85","104","30","08","42","43","44","45","58","59","60","46","47","48","49","17","51","61","62","86","87","14","15","16","88","10","02","89","39","63","64","65","66","03","04","94","67","05","68","32","103","108","07","69","11","23","33","100","109","70","18","40","90","72","73","34","74","71","93","06","38","75","105","76","09","35","77","13","95","96","97","98","78","25","41","53","101","91","79","21","81","80","92","36","37","998","999","99"};
						validVersionCodes[HL7Version.v251] = new string[]{"54","55","82","24","19","27","26","29","56","12","28","20","106","107","50","01","22","102","57","52","83","84","31","85","104","30","08","42","43","44","45","58","59","60","46","47","48","49","17","51","61","62","86","87","14","15","16","88","10","02","89","39","63","64","65","66","03","04","94","67","05","68","32","103","108","07","69","11","23","33","100","109","70","18","40","90","72","73","34","74","71","93","06","38","75","105","76","09","35","77","13","95","96","97","98","78","25","41","53","101","91","79","21","81","80","92","36","37","998","999","99"};
			
			// init the values for version descriptions
						validVersionDescriptions[HL7Version.v23] = new string[]{""};
						validVersionDescriptions[HL7Version.v231] = new string[]{"Adenovirus, type 4","Adenovirus, type 7","Adenovirus, NOS","Anthrax","BCG","Botulinum antitoxin","Cholera","CMVIG","Dengue fever","Diphtheria antitoxin","DT(pediatric)","DTaP","DtaP-Hib","DTP","DTP-Hib","Hantavirus","Hep A - adult","Hep A, ped/adol, 2 dose","Hep A, ped/adol, 3 dose","Hep A, pediatric, NOS","Hep A, NOS","HBIG","Hep B, adolescent or pediatric","Hep B, adolescent/high risk infant","Hep B, adult","Hep B, dialysis","Hep B,  NOS","Hep C","Hep E","Herpes simplex 2","Hib (PRP-D)","Hib (HbOC)","Hib (PRP-T)","Hib (PRP-OMP)","Hib,  NOS","Hib-Hep B","HIV","HPV","IG","IGIV","IG, NOS","Influenza—split (incl. purified surface antigen)","Influenza—whole","Influenza, NOS","IPV","OPV","Polio, NOS","Japanese encephalitis","Junin virus","Leishmaniasis","Leprosy","Lyme disease","MMR","M/R","Malaria","Measles","Melanoma","Meningococcal","Mumps","Parainfluenza-3","Pertussis","Plague","Pneumococcal","Q fever","Rabies, intramuscular injection","Rabies, intradermal injection","Rabies, NOS","Rheumatic fever","Rift Valley fever","RIG","Rotavirus","RSV-IGIV","Rubella","Rubella/Mumps","Smallpox","Staphylococcus bacterio lysate","Td (Adult)","Tetanus toxoid","Tick-borne encephalitis","TIG","Tularemia vaccine","Typhoid—oral","Typhoid—parenteral","Typhoid, parenteral, AKD (U.S. military)","Typhoid, NOS","Vaccinia immune globulin","Varicella","VEE, inactivated","VEE, live","VEE, NOS","VZIG","Yellow fever"};
						validVersionDescriptions[HL7Version.v24] = new string[]{"adenovirus vaccine, type 4, live, oral","adenovirus vaccine, type 7, live, oral","adenovirus vaccine, NOS","anthrax vaccine","Bacillus Calmette-Guerin vaccine","botulinum antitoxin","cholera vaccine","cytomegalovirus immune globulin, intravenous","dengue fever vaccine","diphtheria antitoxin","diphtheria and tetanus toxoids, adsorbed for pediatric use","diphtheria, tetanus toxoids and acellular pertussis vaccine","DTaP-Haemophilus influenzae type b conjugate vaccine","diphtheria, tetanus toxoids and pertussis vaccine","DTP-Haemophilus influenzae type b conjugate vaccine","hantavirus vaccine","hepatitis A vaccine, adult dosage","hepatitis A vaccine, pediatric/adolescent dosage, 2 dose schedule","hepatitis A vaccine, pediatric/adolescent dosage, 3 dose schedule","hepatitis A vaccine, pediatric dosage, NOS","hepatitis A vaccine, NOS","hepatitis B immune globulin","hepatitis B vaccine, pediatric or pediatric/adolescent dosage","hepatitis B vaccine, adolescent/high risk infant dosage","hepatitis B vaccine, adult dosage","hepatitis B vaccine, dialysis patient dosage","hepatitis B vaccine, NOS","hepatitis C vaccine","hepatitis E vaccine","herpes simplex virus, type 2 vaccine","Haemophilus influenzae type b vaccine, PRP-D conjugate","Haemophilus influenzae type b vaccine, HbOC conjugate","Haemophilus influenzae type b vaccine, PRP-T conjugate","Haemophilus influenzae type b vaccine, PRP-OMP conjugate","Haemophilus influenzae type b vaccine, conjugate NOS","Haemophilus influenzae type b conjugate and Hepatitis B vaccine","human immunodeficiency virus vaccine","human papilloma virus vaccine","immune globulin, intramuscular","immune globulin, intravenous","immune globulin, NOS","influenza virus vaccine, split virus (incl. purified surface antigen)","influenza virus vaccine, whole virus","influenza virus vaccine, NOS","poliovirus vaccine, inactivated","poliovirus vaccine, live, oral","poliovirus vaccine, NOS","Japanese encephalitis vaccine","Junin virus vaccine","leishmaniasis vaccine","leprosy vaccine","Lyme disease vaccine","measles, mumps and rubella virus vaccine","measles and rubella virus vaccine","measles, mumps, rubella, and varicella virus vaccine","malaria vaccine","measles virus vaccine","melanoma vaccine","meningococcal polysaccharide vaccine","mumps virus vaccine","parainfluenza-3 virus vaccine","pertussis vaccine","plague vaccine","pneumococcal  polysaccharide vaccine","pneumococcal conjugate vaccine, polyvalent","Q fever vaccine","rabies vaccine, for intramuscular injection","rabies vaccine, for intradermal injection","rabies vaccine, NOS","rheumatic fever vaccine","Rift Valley fever vaccine","rabies immune globulin","rotavirus vaccine, tetravalent, live, oral","respiratory syncytial virus immune globulin, intravenous","respiratory syncytial virus monoclonal antibody (palivizumab), intramuscular","rubella virus vaccine","rubella and mumps virus vaccine","smallpox vaccine","Staphylococcus bacteriophage lysate","tetanus and diphtheria toxoids, adsorbed for adult use","tetanus toxoid","tick-borne encephalitis vaccine","tetanus immune globulin","tuberculin skin test; old tuberculin, multipuncture device","tuberculin skin test; purified protein derivative solution, intradermal","tuberculin skin test; purified protein derivative, multipuncture device","tuberculin skin test; NOS","tularemia vaccine","typhoid vaccine, live, oral","typhoid vaccine, parenteral, other than acetone-killed, dried","typhoid vaccine, parenteral, acetone-killed, dried (U.S. military)","Typhoid Vi capsular polysaccharide vaccine","typhoid vaccine, NOS","vaccinia immune globulin","varicella virus vaccine","Venezuelan equine encephalitis, inactivated","Venezuelan equine encephalitis, live, attenuated","Venezuelan equine encephalitis vaccine, NOS","varicella zoster immune globulin","yellow fever vaccine","unknown vaccine or immune globulin","RESERVED - do not use"};
						validVersionDescriptions[HL7Version.v25] = new string[]{"adenovirus, type 4","adenovirus, type 7","adenovirus, NOS1","anthrax","BCG","botulinum antitoxin","cholera","CMVIG","dengue fever","diphtheria antitoxin","DT (pediatric)","DTaP","DTaP, 5 pertussis antigens","DTaP, NOS","DTaP-Hib ","DTP","DTP-Hib","DTP-Hib-Hep B","hantavirus","Hep A, adult","Hep A, ped/adol, 2 dose","Hep A, ped/adol, 3 dose","Hep A, pediatric, NOS","Hep A, NOS","Hep A-Hep B","HBIG","Hep B, adolescent or pediatric","Hep B, adolescent/high risk infant2","Hep B, adult4","Hep B, dialysis","Hep B, NOS","Hep C","Hep E","herpes simplex 2","Hib (PRP-D)","Hib (HbOC)","Hib (PRP-T)","Hib (PRP-OMP)","Hib, NOS","Hib-Hep B","HIV","HPV","IG","IGIV","IG, NOS","influenza, split (incl. purified surface antigen)","influenza, whole","influenza, NOS","IPV","OPV","polio, NOS","Japanese encephalitis","Junin virus","leishmaniasis","leprosy","Lyme disease","MMR","M/R","MMRV","malaria","measles","melanoma","meningococcal","meningococcal C conjugate","meningococcal, NOS","mumps","parainfluenza-3","pertussis","plague","pneumococcal","pneumococcal conjugate","pneumococcal, NOS","Q fever","rabies, intramuscular injection","rabies, intradermal injection","rabies, NOS","rheumatic fever","Rift Valley fever","RIG","rotavirus","RSV-IGIV ","RSV-MAb","rubella","rubella/mumps","smallpox","smallpox, diluted","Staphylococcus bacterio lysate","Td (adult)","tetanus toxoid","tick-borne encephalitis","TIG","TST-OT tine test","TST-PPD intradermal","TST-PPD tine test","TST, NOS","tularemia vaccine","typhoid, oral","typhoid, parenteral","typhoid, parenteral, AKD (U.S. military)","typhoid, ViCPs","typhoid, NOS","vaccinia immune globulin","Varicella","VEE, inactivated","VEE, live","VEE, NOS","VZIG","yellow fever","no vaccine administered","Unknown","RESERVED - do not use"};
						validVersionDescriptions[HL7Version.v251] = new string[]{"adenovirus, type 4","adenovirus, type 7","adenovirus, NOS1","anthrax","BCG","botulinum antitoxin","cholera","CMVIG","dengue fever","diphtheria antitoxin","DT (pediatric)","DTaP","DTaP, 5 pertussis antigens","DTaP, NOS","DTaP-HibÂ ","DTP","DTP-Hib","DTP-Hib-Hep B","hantavirus","Hep A, adult","Hep A, ped/adol, 2 dose","Hep A, ped/adol, 3 dose","Hep A, pediatric, NOS","Hep A, NOS","Hep A-Hep B","HBIG","Hep B, adolescent or pediatric","Hep B, adolescent/high risk infant2","Hep B, adult4","Hep B, dialysis","Hep B, NOS","Hep C","Hep E","herpes simplex 2","Hib (PRP-D)","Hib (HbOC)","Hib (PRP-T)","Hib (PRP-OMP)","Hib, NOS","Hib-Hep B","HIV","HPV","IG","IGIV","IG, NOS","influenza, split (incl. purified surface antigen)","influenza, whole","influenza, NOS","IPV","OPV","polio, NOS","Japanese encephalitis","Junin virus","leishmaniasis","leprosy","Lyme disease","MMR","M/R","MMRV","malaria","measles","melanoma","meningococcal","meningococcal C conjugate","meningococcal, NOS","mumps","parainfluenza-3","pertussis","plague","pneumococcal","pneumococcal conjugate","pneumococcal, NOS","Q fever","rabies, intramuscular injection","rabies, intradermal injection","rabies, NOS","rheumatic fever","Rift Valley fever","RIG","rotavirus","RSV-IGIVÂ ","RSV-MAb","rubella","rubella/mumps","smallpox","smallpox, diluted","Staphylococcus bacterio lysate","Td (adult)","tetanus toxoid","tick-borne encephalitis","TIG","TST-OT tine test","TST-PPD intradermal","TST-PPD tine test","TST, NOS","tularemia vaccine","typhoid, oral","typhoid, parenteral","typhoid, parenteral, AKD (U.S. military)","typhoid, ViCPs","typhoid, NOS","vaccinia immune globulin","Varicella","VEE, inactivated","VEE, live","VEE, NOS","VZIG","yellow fever","no vaccine administered","Unknown","RESERVED - do not use"};
			            

        }

        
        public override ValidationIssue[] RunRule(string name, object owningObject, object value)
        {
            //todo: check if the value is valid in the current version
            //if the value is not valid in the current version, add it as a validation issue


            return new ValidationIssue[0];
        }
    }
}
